#文章管理的model
config = require('../config')
Schema = config.Schema
mongoose = config.mongoose


#手机号，系统版本，软件版本，软件类型（ios/android）、反馈内容，请胡纬提供接口给江军
MobileFeedbackSchema = new Schema({
  mobile :
    type : String
    required : true
  sys_version :
    type : String
    required : true
  soft_version :
    type : String
    required : true
  soft_type :
    type : String
    required : true
  content :
    type : String
    required : true
  create_date :
    type : Date
    default : Date.now
})


MobileFeedbackSchema.methods.add = (req,cb) ->
  this.mobile = req.param('mobile')
  this.sys_version = req.param('sys_version')
  this.soft_version = req.param('soft_version')
  this.soft_type = req.param('soft_type')
  this.content = req.param('content')
  this.save cb

exports.MobileFeedback = mongoose.model 'MobileFeedback', MobileFeedbackSchema